package java基础.struct;

/**
 * @author IT_Jay
 * @date 2021/12/12 21:05
 */

public class Demo14 {
    public static void main(String[] args) {
        //方法一
        int count = 0;
        for (int i = 0; i <= 1000; i += 5) {

            System.out.print(i + " ");
            count++;
            if (count % 3 == 0) {
                System.out.println();
            }
        }

        /*
        //方法二
        //println 输出完换行
        //print 输出完不换行
        for (int j = 0; j <= 1000; j++) {

            if (j % 5 == 0) {
                System.out.print(j + "\t");
            }
            if (j % (5 * 3) == 0) {
//                System.out.println();
                System.out.print("\n");
            }
        }
        */
    }
}

